package com.wanmait.recruitment.service.impl;

import com.github.pagehelper.PageInfo;
import com.wanmait.recruitment.mapper.ExRequireMapper;
import com.wanmait.recruitment.pojo.ExRequire;
import com.wanmait.recruitment.service.ExRequireService;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
@Service
@Transactional(rollbackFor = Exception.class)
public class ExRequireServiceImpl implements ExRequireService {
    @Resource
    private ExRequireMapper exRequireMapper;
    @Override
    //@CacheEvict(value = "exRequireCache",allEntries = true)
    public void insert(ExRequire object) {
        exRequireMapper.insertSelective(object);
    }

    @Override
    //@CacheEvict(value = "exRequireCache",allEntries = true)
    public void delete(Integer id) {
        exRequireMapper.del(id);
    }

    @Override
    public void delete(String ids) {

    }

    @Override
    //@CacheEvict(value = "exRequireCache",allEntries = true)
    public void update(ExRequire object) {
        exRequireMapper.updateByPrimaryKeySelective(object);
    }

    @Override
    public ExRequire findById(Integer id) {
        return null;
    }

    @Override
    //@Cacheable("exRequireCache")
    public List<ExRequire> findAll() {
        return exRequireMapper.findAll();
    }

    @Override
    public List<ExRequire> findAll(ExRequire object) {
        return null;
    }

    @Override
    public PageInfo<ExRequire> findPage(int pageNum, int pageSize) {
        return null;
    }

    @Override
    public ExRequire findByName(String name) {
        return exRequireMapper.findByName(name);
    }
}
